Skip to content

Support local cfbot integration development with dummy data #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

JelteF
Copy link
Collaborator

@JelteF JelteF commented Jan 26, 2025

This adds some basic functionality to allow making changes to the CFBot integration locally, without having to push to prod/staging. To do so this adds the CFBot integration tables to the admin panel and adds some dummy CFBot data to our dummy development dataset. One somewhat interesting thing this required that now the CfbotBranch has an overridden save method, which stores NULL in the commit_id if an empty string is saved. This only impacts the save behaviour of the Django admin interface because the webhook that the actual CFBot calls bypasses the Django models and inserts directly into the underlying tables.

This is only really useful when saving the entry from the admin panel.
JelteF added a commit that referenced this pull request Jan 31, 2025
As far as I can tell this doesn't matter in practice, because it seems
that with the way we use CirrusCI it never actually returns the
SCHEDULED status. I ran into this when working with some dummy
development data though (see #8).
@JelteF JelteF merged commit 9dfa825 into main Jan 31, 2025
JelteF added a commit that referenced this pull request Feb 16, 2025
As far as I can tell this doesn't matter in practice, because it seems
that with the way we use CirrusCI it never actually returns the
SCHEDULED status. I ran into this when working with some dummy
development data though (see #8).
JelteF added a commit that referenced this pull request Feb 16, 2025
This adds some basic functionality to allow making changes to the CFBot
integration locally, without having to push to prod/staging. To do so
this adds the CFBot integration tables to the admin panel and adds some
dummy CFBot data to our dummy development dataset. One somewhat
interesting thing this required that now the `CfbotBranch` has an
overridden `save` method, which stores `NULL` in the commit_id if an
empty string is saved. This only impacts the save behaviour of the
Django admin interface because the webhook that the actual CFBot calls
bypasses the Django models and inserts directly into the underlying
tables.
@JelteF JelteF deleted the cfbot-dummy branch February 27, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant